﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IGolovkine.Core.Diagnostics;

namespace IGolovkine.ShoutCastRipper
{
    public class ContentReceivedEventArgs : StationClientEvent
    {
        private readonly byte [] _buffer;
        private readonly TimeSpan _contentLength;
        
        public ContentReceivedEventArgs(byte [] buffer, string contentTitle, TimeSpan contentLength) : base(contentTitle)
        {
            Debug.NotNullOrEmpty(() => contentTitle);
            Debug.NotDefault(() => buffer);
            Debug.Expect(() => buffer.Length != 0);
            
            _buffer = buffer;
            _contentLength = contentLength;
        }

        public byte [] Data
        {
            get { return _buffer; }
        }

        public TimeSpan ContentLength
        {
            get { return _contentLength; }
        }
    }
}
